﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace OfficeHelper
{
    public class BuiltInFuncs1: IBuiltInFuncs
    {
        public string RunFunc(string funcName, string[] paramValues)
        {
            string value = "";
            switch(funcName)
            {
                case "GetSex":
                    {
                        value = GetSex(paramValues);
                        break;
                    }
            }
            return value;
        }

        private string GetSex(string[] paramValues)
        {
            string sex = paramValues[0];
            if (sex == "男") return "man";
            else if (sex == "女") return "woman";
            else return "unknown";
        }
    }

    public class DefaultBuiltInFuncs : IBuiltInFuncs
    {
        public string RunFunc(string funcName, string[] paramValues)
        {
            return "";
        }
    }
    
    public interface IBuiltInFuncs
    {
        string RunFunc(string funcName, string[] paramValues);
    }
}
